import store from "../store";
export function toas(msg, type) {
    //先显示
    // store.commit('showToast', { msg, type })
    switch (type) {
        case 'dander':
            type = 'icon-toast-shibai_huaban'
            break;
        case 'warning':
            type = 'icon-toast-jinggao'
            break;
        default:
            type='icon-toast_chenggong'
    }
    //先显示
    store.commit('showToast',{msg,type})
    //等待一会，隐藏了
    setTimeout(() => {
        store.commit('hideToast')
    },2000)
}